home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / bbs / filelister146.lha / Rexx / Logoff.trans < prev    next >
Text File  |  1994-09-13  |  2KB  |  77 lines

  1. /* Diese Elemente sollten UNBEDINGT im Logoff.trans vorhanden sein */
  2.  
  3. options results
  4.  
  5. userpath='USER:'
  6.  
  7. usersdir='BBS:Users/'
  8.  
  9. userinfo a ; uname=result
  10.  
  11. bbsidentify term
  12. bbsline=strip(word(result,4))
  13.  
  14. i=0
  15. if open(userfile,usersdir||uname,'R') then do
  16.   i=1
  17.   do while ~eof(userfile)
  18.     user.i=readln(userfile)
  19.     i=i+1
  20.   end
  21.   call close(userfile)
  22. end
  23.  
  24. if open(logondate,userpath||'logon-'||uname,'R') then do
  25.   logondatum=readln(logondate)
  26.   call close(logondate)
  27.   user.9=logondatum
  28.   address command 'delete >NIL: "'||userpath||'logon-'||uname||'"'
  29. end
  30.  
  31. if i~=0 then do
  32.   if open('download',userpath||'down-'||uname,'R') then do
  33.     gesamt=readln('download')
  34.     anzahl=readln('download')
  35.     neudown=value('user.11')+(value('gesamt')%1024)
  36.     user.11=insert(' ',neudown)
  37.     neudown=value('user.12')+value('anzahl')
  38.     user.12=insert(' ',neudown)
  39.     call close('download')
  40.     address command 'DELETE >NIL: "'||userpath||'down-'||uname'"'
  41.   end
  42.  
  43.   /* fuer spaetere Erweiterungen MIT Upload */
  44.   if open('upload',userpath||'up-'||uname,'R') then do
  45.     gesamt=readln('upload')
  46.     anzahl=readln('upload')
  47.     neuup=value('user.13')+(value('gesamt')%1024)
  48.     user.13=insert(' ',neuup)
  49.     neuup=value('user.14')+value('anzahl')
  50.     user.14=insert(' ',neuup)
  51.     call close('upload')
  52.     address command 'DELETE >NIL: "'||userpath||'up-'||uname'"'
  53.   end
  54.  
  55. end
  56.  
  57. if i>1 then
  58.   if open(userfile,usersdir||uname,'W') then do
  59.     do j=1 to i-2
  60.     call writeln(userfile,user.j)
  61.     end
  62.     call close(userfile)
  63.   end
  64.  
  65. befehl="host=show('P','FILELISTER."||bbsline||"')"
  66. interpret befehl
  67.  
  68. /* Filelister rescannen, falls Port verfuegbar                     */
  69. if host then do
  70.   befehl="address 'FILELISTER."||bbsline||"' 'RESCAN'"
  71.   interpret befehl
  72. end
  73.  
  74. call "BBS:Rexx/CheckMem.rexx"
  75.  
  76. exit 0
  77.